#include <stdio.h>

/*
 * 
 */

int main()
{
	int a = 0;

	while (a++ < 10)
		printf("The while loop.\n");

	do {
		printf("The do loop.\n");
	}
	while (--a > 0);

	return 0;
}

#if 0

/*
 * intel
 */
0000000000001149 <main>:
    1149:	f3 0f 1e fa          	endbr64 
    114d:	55                   	push   %rbp
    114e:	48 89 e5             	mov    %rsp,%rbp
    1151:	48 83 ec 10          	sub    $0x10,%rsp

    1155:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%rbp)		// (rbp-0x4)=0x0
    115c:	eb 0c                	jmp    116a <main+0x21>		// jmp
    115e:	48 8d 3d 9f 0e 00 00 	lea    0xe9f(%rip),%rdi        # 2004 <_IO_stdin_used+0x4>
    1165:	e8 e6 fe ff ff       	callq  1050 <puts@plt>		// puts()
    116a:	8b 45 fc             	mov    -0x4(%rbp),%eax		// eax=(rbp-0x4)
    116d:	8d 50 01             	lea    0x1(%rax),%edx		// edx=(rax+0x1)
    1170:	89 55 fc             	mov    %edx,-0x4(%rbp)		// (rbp-0x4)=edx
    1173:	83 f8 09             	cmp    $0x9,%eax		// eax-0x9
    1176:	7e e6                	jle    115e <main+0x15>		// 带符号 <=

    1178:	48 8d 3d 95 0e 00 00 	lea    0xe95(%rip),%rdi        # 2014 <_IO_stdin_used+0x14>
    117f:	e8 cc fe ff ff       	callq  1050 <puts@plt>		// puts()
    1184:	83 6d fc 01          	subl   $0x1,-0x4(%rbp)		// (rbp-0x4)-=0x1
    1188:	83 7d fc 00          	cmpl   $0x0,-0x4(%rbp)		// (rbp-0x4)-0x
    118c:	7f ea                	jg     1178 <main+0x2f>		// 大于(有符号>)
    118e:	b8 00 00 00 00       	mov    $0x0,%eax
    1193:	c9                   	leaveq 
    1194:	c3                   	retq   
    1195:	66 2e 0f 1f 84 00 00 	nopw   %cs:0x0(%rax,%rax,1)
    119c:	00 00 00 
    119f:	90                   	nop

/*
 * arm
 */
000000000040055c <main>:
  40055c:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  400560:	910003fd 	mov	x29, sp
  400564:	b9001fbf 	str	wzr, [x29, #28]		// [x29+28]=0

  400568:	14000004 	b	400578 <main+0x1c>
  40056c:	90000000 	adrp	x0, 400000 <_init-0x3e8>
  400570:	9119c000 	add	x0, x0, #0x670
  400574:	97ffffb7 	bl	400450 <puts@plt>	// puts()
  400578:	b9401fa0 	ldr	w0, [x29, #28]		// w0=[x29+28]
  40057c:	11000401 	add	w1, w0, #0x1		// w1=w0+0x1
  400580:	b9001fa1 	str	w1, [x29, #28]		// [x29+28]=w1
  400584:	7100241f 	cmp	w0, #0x9		// w0-0x9
  400588:	54ffff2d 	b.le	40056c <main+0x10>	// jump

  40058c:	90000000 	adrp	x0, 400000 <_init-0x3e8>
  400590:	911a0000 	add	x0, x0, #0x680
  400594:	97ffffaf 	bl	400450 <puts@plt>	// puts()
  400598:	b9401fa0 	ldr	w0, [x29, #28]		// w0=[x29+28]
  40059c:	51000400 	sub	w0, w0, #0x1		// w0=w0-0x1
  4005a0:	b9001fa0 	str	w0, [x29, #28]		// [x29+28]=w0
  4005a4:	b9401fa0 	ldr	w0, [x29, #28]		// w0=[x29+28]
  4005a8:	7100001f 	cmp	w0, #0x0		// w0-0
  4005ac:	54ffff0c 	b.gt	40058c <main+0x30>	// 带符号 > 	jump

  4005b0:	52800000 	mov	w0, #0x0                   	// #0
  4005b4:	a8c27bfd 	ldp	x29, x30, [sp], #32
  4005b8:	d65f03c0 	ret
  4005bc:	00000000 	.inst	0x00000000 ; undefined

#endif
